MAINT: Use mffpy for EGI metadata reading and add PNS shim#13945
Merged
scott-huberty merged 9 commits intoJun 23, 2026
Conversation
11 tasks
PragnyaKhandelwal
added a commit
to PragnyaKhandelwal/mne-python
that referenced
this pull request
Jun 5, 2026
Contributor
Author
|
Hey @scott-huberty! This one's ready for a look when you get a chance. Swapped out |
…e merged upstream fix BEL-Public/mffpy#145
for more information, see https://pre-commit.ci
823381d to
510e0fa
Compare
scott-huberty
approved these changes
Jun 17, 2026
scott-huberty
left a comment
Contributor
There was a problem hiding this comment.
LGTM! I have a few nitpicks, please see my comments.
Contributor
|
Thanks @PragnyaKhandelwal ! 92% test coverage 🚀 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
None
What does this implement/fix?
This PR completes the refactor of the EGI MFF reader to utilize the native
mffpylibrary for metadata parsing, replacing the legacydefusedxmlimplementation.Key changes include:
info.xml,sensorLayout.xml,pnsSet.xml, andcoordinates.xmltomffpy.xml_files.XML.from_file().mne/fixes.pyto handlePNSSetsensor parsing, bypassing aKeyError: 'conversion'found inmffpyv0.11.0 whenpnsSet.xmlcontains a<conversion>tag.mne/io/egi/egimff.pyto ensure consistent channel naming and namespace handling, resolvingRuntimeWarning: Channel names are not uniqueerrors.mffpydependency to>= 0.11.0inpyproject.tomlandenvironment.yml.Dependencies
mffpydependency to>= 0.11.0inpyproject.tomlandenvironment.yml.KeyError: 'conversion'and nanosecond timestamp parsing issues encountered when usingmffpynatively.mffpyfor EGI MFF event reading #13932.Additional information
I have reported the upstream
mffpyissue here: mffpy/#144. We are using a temporary fallback shim inmne/fixes.pyto keep the MNE test suite stable while waiting for an upstream fix.